home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
misc
/
FractalDynamics.lha
/
FractalDynamics12.s
< prev
Wrap
Text File
|
1991-09-05
|
39KB
|
2,429 lines
;Mandelbrot generator PRO
;Last modification 5 november 1990 - 0H17
;V1.1 modified 18 february 1991
;V1.2 modified 17 august 1991
VERSION = '1.2 '
HardKbd = $bfec01
HardKbdESC = $75
HardMouse = $bfe001
HardMouseButton = 6
OpenLibrary = -552
CloseLibrary = -414
FindTask = -294
GetMsg = -372
WaitPort = -384
Forbid = -132
ReplyMsg = -378
AllocMem = -198
FreeMem = -210
Wait = -318
pr_CLI = $ac
pr_MsgPort = $5c
sm_ArgList = $24
pr_WindowPtr = $b8
OpenScreen = -198
OpenWindow = -204
CloseScreen = -66
CloseWindow = -72
SetMenuStrip = -264
ClearMenuStrip = -54
PrintIText = -216
SetWindowTitles = -276
ScreenToFront = -252
LoadRGB4 = -192
SetAPen = -342
RectFill = -306
SetDrMd = -354
Move = -240
Draw = -246
SPFix =-30
SPFlt =-36
SPCmp =-42
SPAdd =-66
SPSub =-72
SPMul =-78
SPDiv =-84
SPNeg =-60
Open = -30
Write = -48
Close = -36
CurrentDir = -126
FileRequest = -294
Real316 = $9e000049
Real178 = $b2000048
Real80 = $a0000047
Real50 = $c8000046
Real2 = $80000042
Realm2 = $800000C2
Real4 = $80000043
Real10 = $A0000044
SECTION interet,CODE
move.l 4,a6
lea IntuitionName,a1
moveq.l #0,d0
jsr OpenLibrary(a6)
move.l d0,IntuitionLib
lea GfxName,a1
moveq.l #0,d0
jsr OpenLibrary(a6)
move.l d0,GfxLib
lea FFPName,a1
moveq.l #0,d0
jsr OpenLibrary(a6)
move.l d0,FFPLib
lea DosName,a1
moveq.l #0,d0
jsr OpenLibrary(a6)
move.l d0,DosLib
lea ArpName,a1
moveq.l #33,d0
jsr OpenLibrary(a6)
move.l d0,ArpLib
;V0.99 change : no more bugs
;while saving under WB
sub.l a1,a1
jsr FindTask(a6)
move.l d0,a4
move.l d0,MyTask
tst.l pr_CLI(a4)
bne FromCLI
lea pr_MsgPort(a4),a0
jsr WaitPort(a6)
lea pr_MsgPort(a4),a0
jsr GetMsg(a6)
move.l d0,WB_Message
move.l d0,a0
move.l sm_ArgList(a0),a0
cmp.l #0,a0
beq.s Ende_StartUp
move.l (a0),d1
move.l DosLib,a6
jsr CurrentDir(a6)
Ende_StartUp:
FromCLI:
move.l IntuitionLib,a6
lea ScreenDefs,a0
jsr OpenScreen(a6)
move.l d0,ScreenHandler
move.l d0,ScreenHandler2
move.l d0,ScreenHandler3
move.l d0,ScreenHandler4
lea WindowDefs,a0
jsr OpenWindow(a6)
move.l d0,WindowHandler
move.l d0,a0
move.l d0,ArpRequest+12
move.l 50(a0),RastPort
lea Menu00,a1
jsr SetMenuStrip(a6)
;V1.1 change : system messages on my window
move.l MyTask,a0
move.l pr_WindowPtr(a0),OldFashion
move.l WindowHandler,pr_WindowPtr(a0)
;V0.8 change : colors included
move.l GfxLib,a6
move.l ScreenHandler,a0
add.l #44,a0
lea Palette1,a1
move.l #32,d0
jsr LoadRGB4(a6)
bsr Info
;V0.2 change : wait a menu to start
WaitMenu:
move.l 4,a6
ChoiceNotOK:
move.l WindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne ChoiceOK
move.l WindowHandler,a0
move.l 86(A0),a0
moveq.l #0,d1
move.b 15(A0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(A6)
bra ChoiceNotOK
ChoiceOK:
move.l d0,a1
move.w 24(a1),d0
move.w d0,-(sp)
jsr ReplyMsg(a6)
move.w (sp)+,d0
cmpi.w #-1,d0
beq ChoiceNotOK
move.w d0,d1
andi.w #$1f,d0
lsr.w #5,d1
andi.w #$3f,d1
cmpi.w #4,d0
beq Picture
cmpi.w #3,d0
beq Colors
cmpi.w #2,d0
beq Zoom
cmpi.w #1,d0
beq Set
Project:
cmpi.w #4,d1
beq End
cmpi.w #2,d1
beq Generate
cmpi.w #0,d1
beq Save
bsr Info
bra WaitMenu
Set:
cmpi.w #1,d1
beq Julia
bra Mandelbrot
Zoom:
cmpi.w #1,d1
beq Manual
bsr OnScreen
bra WaitMenu
Picture:
cmpi.w #1,d1
beq Small
bra Large
Colors:
cmpi.w #2,d1
beq RedBlue
cmpi.w #1,d1
beq GreenBlue
bra Rainbow
Save:
bsr SaveILBM
bra WaitMenu
Stop:
bsr Info
bra WaitMenu
Mandelbrot:
tst.b JuliaFlag
beq MandelbrotOK
move.b #1,Menu11+12
bra WaitMenu
MandelbrotOK:
move.l IntuitionLib,a6
move.l WindowHandler,a0
jsr ClearMenuStrip(a6)
clr.b Menu12+12
move.b #-1,JuliaFlag
move.l WindowHandler,a0
lea Menu00,a1
jsr SetMenuStrip(a6)
lea SoundOfTwo,a0
lea MinX,a1
lea MinY,a2
lea MaxX,a3
lea MaxY,a4
moveq.w #9,d0
CopyLoop:
move.b (a0),(a1)+
move.b (a0),(a2)+
move.b (a0),(a3)+
move.b (a0)+,(a4)+
dbra d0,CopyLoop
move.b #'-',MinX
move.b #'-',MinY
;v1.1 change : no more self modifying source
; lea ComputeMandelPoint,a0
; move.l a0,HereJSR+2
move.l WindowHandler,a0
lea TitreEcran,a2
lea TitreFenetre2,a1
jsr SetWindowTitles(a6)
clr.b ZoomFlag
bra WaitMenu
Julia:
tst.b JuliaFlag
bne JuliaOK
move.b #1,Menu12+12
bra WaitMenu
JuliaOK:
move.l IntuitionLib,a6
move.l WindowHandler,a0
jsr ClearMenuStrip(a6)
clr.b Menu11+12
clr.b JuliaFlag
move.l WindowHandler,a0
lea Menu00,a1
jsr SetMenuStrip(a6)
lea SoundOfTwo,a0
lea MinX,a1
lea MinY,a2
lea MaxX,a3
lea MaxY,a4
moveq.w #9,d0
JuliaCopyLoop:
move.b (a0),(a1)+
move.b (a0),(a2)+
move.b (a0),(a3)+
move.b (a0)+,(a4)+
dbra d0,JuliaCopyLoop
move.b #'-',MinX
move.b #'-',MinY
; lea ComputeJuliaPoint,a0
; move.l a0,HereJSR+2
move.l WindowHandler,a0
lea TitreEcran,a2
lea TitreFenetre1,a1
jsr SetWindowTitles(a6)
clr.b ZoomFlag
JuliaGo:
move.l IntuitionLib,a6
lea JuliaWindowDefs,a0
jsr OpenWindow(a6)
move.l d0,JuliaWindowHandler
move.l 4,a6
JuliaNotOK:
move.l JuliaWindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne Julia_OK
move.l JuliaWindowHandler,a0
move.l 86(a0),a0
moveq.l #0,d1
move.b 15(a0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(A6)
bra JuliaNotOK
Julia_OK:
move.l d0,a1
move.l 28(a1),a0
move.w $26(a0),d6
jsr ReplyMsg(a6)
cmpi.w #1,d6
beq JuliaEnd
cmpi.w #2,d6
bne JuliaNotOK
;JuliaOnScreen:
move.l JuliaWindowHandler,a0
move.l IntuitionLib,a6
jsr CloseWindow(a6)
move.l WindowHandler,a0
JuliaOSWait:
btst #HardMouseButton,HardMouse
bne JuliaOSWait
JuliaOSWait2:
btst #HardMouseButton,HardMouse
bne JuliaOSWait2
bsr GetCoords
sub.w ScrMinX+2,d0
sub.w ScrMinY+2,d1
move.w d0,d6
move.w d1,d7
and.l #$ffff,d6
and.l #$ffff,d7
move.l FFPLib,a6
move.l RealMaxX,d0
move.l RealMinX,d1
jsr SPSub(a6)
move.l RealXSize,d1
jsr SPDiv(a6)
move.l d0,d5
move.l d6,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinX,d1
jsr SPAdd(a6)
move.l d0,RealAA
lea AA,a0
bsr FFPTOS
move.l RealMaxY,d0
move.l RealMinY,d1
jsr SPSub(a6)
move.l RealYSize,d1
jsr SPDiv(a6)
move.l d0,d5
move.l d7,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinY,d1
jsr SPAdd(a6)
move.l d0,RealOO
lea OO,a0
bsr FFPTOS
bra JuliaGo
JuliaEnd:
move.l FFPLib,a6
lea OO,a0
bsr STOFFP
move.l d0,RealOO
lea AA,a0
bsr STOFFP
move.l d0,RealAA
move.l IntuitionLib,a6
move.l JuliaWindowHandler,a0
jsr CloseWindow(a6)
bra WaitMenu
Small:
move.b #1,Menu42+12
clr.b Menu41+12
clr.b SmallFlag
bra WaitMenu
Large:
move.b #1,Menu41+12
clr.b Menu42+12
move.b #-1,SmallFlag
bra WaitMenu
Rainbow:
move.b #1,Menu31+12
tst.b ColorFlag
beq WaitMenu
clr.b Menu32+12
clr.b Menu33+12
move.l GfxLib,a6
move.l ScreenHandler,a0
add.l #44,a0
lea Palette1,a1
move.l #32,d0
jsr LoadRGB4(a6)
clr.b ColorFlag
bra WaitMenu
GreenBlue:
move.b #1,Menu32+12
cmpi.b #1,ColorFlag
beq WaitMenu
clr.b Menu31+12
clr.b Menu33+12
move.l GfxLib,a6
move.l ScreenHandler,a0
add.l #44,a0
lea Palette2,a1
move.l #32,d0
jsr LoadRGB4(a6)
move.b #1,ColorFlag
bra WaitMenu
RedBlue:
move.b #1,Menu33+12
cmpi.b #2,ColorFlag
beq WaitMenu
clr.b Menu31+12
clr.b Menu32+12
move.l GfxLib,a6
move.l ScreenHandler,a0
add.l #44,a0
lea Palette3,a1
move.l #32,d0
jsr LoadRGB4(a6)
move.b #2,ColorFlag
bra WaitMenu
;*******************************************
;*** Compute a whole picture ***************
;*******************************************
Generate:
move.l IntuitionLib,a6
move.l WindowHandler,a0
jsr ClearMenuStrip(a6)
move.l GfxLib,a6
move.l RastPort,a1
moveq.l #0,d0
jsr SetAPen(a6)
move.l RastPort,a1
move.l #2,d0
move.l #10,d1
move.l #318,d2
move.l #188,d3
jsr RectFill(a6)
tst.b SmallFlag
bne LargePicture
move.l #120,ScrMinX
move.l #65,ScrMinY
move.l #200,ScrMaxX
move.l #115,ScrMaxY
move.l #Real80,RealXSize
move.l #Real50,RealYSize
bra SmallPicture
LargePicture:
move.l #2,ScrMinX
move.l #10,ScrMinY
move.l #319,ScrMaxX
move.l #189,ScrMaxY
move.l #Real316,RealXSize
move.l #Real178,RealYSize
SmallPicture:
move.l FFPLib,a6
tst.b ZoomFlag
bne RealBorns
lea MaxX,a0
bsr STOFFP
move.l d0,RealMaxX
lea MaxY,a0
bsr STOFFP
move.l d0,RealMaxY
lea MinX,a0
bsr STOFFP
move.l d0,RealMinX
lea MinY,a0
bsr STOFFP
move.l d0,RealMinY
bra AfterRealBorns
RealBorns:
move.l ZoomMinX,RealMinX
move.l ZoomMinY,RealMinY
move.l ZoomMaxX,RealMaxX
move.l ZoomMaxY,RealMaxY
AfterRealBorns:
move.l RealMaxX,d0
move.l RealMinX,d1
jsr SPSub(a6)
move.l RealXSize,d1
jsr SPDiv(a6)
move.l d0,CoefTransX
move.l RealMaxY,d0
move.l RealMinY,d1
jsr SPSub(a6)
move.l RealYSize,d1
jsr SPDiv(a6)
move.l d0,CoefTransY
move.l ScrMinY,d1
LoopY:
move.l ScrMinX,d0
LoopX:
move.l FFPLib,a6
tst.b JuliaFlag
bne.s NotAJuliaSet
jsr ComputeJuliaPoint
bra.s WasAJuliaSet
NotAJuliaSet:
jsr ComputeMandelPoint
WasAJuliaSet:
movem.l d0/d1,-(sp)
move.l RastPort,a0
move.w d4,d2
addq.w #1,d2
lsr.w #1,d2
jsr FastPlot(pc)
movem.l (sp)+,d0/d1
cmpi.b #HardKbdESC,HardKbd
beq EndGenerate
addq.l #1,d0
cmp.l ScrMaxX,d0
blt LoopX
addq.l #1,d1
cmp.l ScrMaxY,d1
blt LoopY
EndGenerate:
move.l IntuitionLib,a6
move.l WindowHandler,a0
lea Menu00,a1
jsr SetMenuStrip(a6)
move.l FFPLib,a6
move.l RealMaxX,d0
lea MaxX,a0
bsr FFPTOS
move.l RealMaxY,d0
lea MaxY,a0
bsr FFPTOS
move.l RealMinX,d0
lea MinX,a0
bsr FFPTOS
move.l RealMinY,d0
lea MinY,a0
bsr FFPTOS
move.l RealAA,d0
lea AA,a0
bsr FFPTOS
move.l RealOO,d0
lea OO,a0
bsr FFPTOS
bra WaitMenu
;*********************************************
;*** Finished : leave the prg. ***************
;*********************************************
End:
move.l MyTask,a0
move.l OldFashion,pr_WindowPtr(a0)
move.l IntuitionLib,a6
move.l WindowHandler,a0
jsr ClearMenuStrip(a6)
move.l WindowHandler,a0
jsr CloseWindow(a6)
move.l ScreenHandler,a0
jsr CloseScreen(a6)
move.l a6,a1
move.l 4,a6
jsr CloseLibrary(a6)
move.l ArpLib,a1
cmp.l #0,a1
beq ThereWhereNoArp
jsr CloseLibrary(a6)
ThereWhereNoArp:
move.l FFPLib,a1
jsr CloseLibrary(a6)
move.l GfxLib,a1
jsr CloseLibrary(a6)
move.l DosLib,a1
jsr CloseLibrary(a6)
tst.l WB_Message
beq.s NoStartWB
jsr Forbid(a6)
move.l WB_Message,a1
jsr ReplyMsg(a6)
NoStartWB:
moveq.l #0,d0
rts
;************************************************
;*** Compute one point of the Julia set *********
;************************************************
ComputeJuliaPoint:
movem.l d0/d1,-(sp)
sub.l ScrMinX,d0
sub.l ScrMinY,d1
move.l d1,d7
jsr SPFlt(a6)
move.l CoefTransX,d1
jsr SPMul(a6)
move.l RealMinX,d1
jsr SPAdd(a6)
move.l d0,d6
move.l d7,d0
jsr SPFlt(a6)
move.l CoefTransY,d1
jsr SPMul(a6)
move.l RealMinY,d1
jsr SPAdd(a6)
move.l d0,d7
moveq.l #63,d4
loop:
move.l d7,d0
move.l d7,d1
jsr SPMul(a6) ;x*x
move.l d0,d5
move.l d6,d0
move.l d6,d1
jsr SPMul(a6) ;y*y
move.l d5,d1
jsr SPSub(a6) ;x^2-y^2
move.l RealAA,d1
jsr SPAdd(a6) ;x^2-y^2+AA
move.l d0,d5
; move.l #Real2,d0
; move.l d6,d1
; jsr SPMul(a6) ;2*x
move.l d6,d0
addq #1,d0
move.l d7,d1
jsr SPMul(a6) ;2*x*y
move.l RealOO,d1
jsr SPAdd(a6) ;2*x*y+OO
move.l d0,d7
move.l d5,d6
move.l d0,d1
jsr SPMul(a6) ;x^2
move.l d0,d5
move.l d7,d0
move.l d7,d1
jsr SPMul(a6) ;y^2
move.l d5,d1
jsr SPAdd(a6) ;x^2+y^2
move.l #Real4,d1
jsr SPCmp(a6) ; <4 ?
cmpi.b #1,d0
bne EndOfLoop
dbra d4,loop
EndOfLoop:
movem.l (sp)+,d0/d1
rts
;************************************************
;*** Compute one point of the Mandelbrot set ****
;************************************************
ComputeMandelPoint:
movem.l d0/d1,-(sp)
sub.l ScrMinX,d0
sub.l ScrMinY,d1
move.l d1,d7
jsr SPFlt(a6)
move.l CoefTransX,d1
jsr SPMul(a6)
move.l RealMinX,d1
jsr SPAdd(a6)
move.l d0,RealR
move.l d7,d0
jsr SPFlt(a6)
move.l CoefTransY,d1
jsr SPMul(a6)
move.l RealMinY,d1
jsr SPAdd(a6)
move.l d0,RealI
moveq.l #0,d6
moveq.l #0,d7
moveq.l #63,d4
MandelLoop:
move.l d7,d0
move.l d7,d1
jsr SPMul(a6) ;x*x
move.l d0,d5
move.l d6,d0
move.l d6,d1
jsr SPMul(a6) ;y*y
move.l d5,d1
jsr SPSub(a6) ;x^2-y^2
move.l RealR,d1
jsr SPAdd(a6) ;x^2-y^2+R
move.l d0,d5
; move.l #Real2,d0
; move.l d6,d1
; jsr SPMul(a6)
move.l d6,d0 ; speedy code for
addq #1,d0 ; FFP * 2
move.l d7,d1
jsr SPMul(a6)
move.l RealI,d1
jsr SPAdd(a6)
move.l d0,d7
move.l d5,d6
move.l d0,d1
jsr SPMul(a6)
move.l d0,d5
move.l d7,d0
move.l d7,d1
jsr SPMul(a6)
move.l d5,d1
jsr SPAdd(a6)
move.l #Real4,d1
jsr SPCmp(a6)
cmpi.b #1,d0
bne EndOfMandelLoop
dbra d4,MandelLoop
EndOfMandelLoop:
movem.l (sp)+,d0/d1
rts
;*************************************************************************
;***** STOFFP(string) transform a string into a fast floating point **
;*************************************************************************
STOFFP:
movem.l d1/d2/d3,-(sp)
moveq.l #0,d0
moveq.l #1,d3
STOFFP_Label:
cmpi.b #' ',(a0)
beq STOFFP_GoOn
cmpi.b #'+',(a0)
bne STOFFP_DontGoOn
STOFFP_GoOn:
add.l #1,a0
bra STOFFP_Label
STOFFP_DontGoOn:
cmpi.b #'-',(a0)
bne STOFFP_NoMinus
neg.l d3
add.l #1,a0
STOFFP_NoMinus:
moveq.l #0,d2
STOFFP_NoLuck:
move.b (a0)+,d2
tst.b d2
beq STOFFP_Finish
cmpi.b #' ',d2
beq STOFFP_NoLuck
cmpi.b #'.',d2
beq STOFFP_AfterPoint
move.l #Real10,d1
jsr SPMul(a6)
sub.b #'0',d2
exg.l d2,d0
jsr SPFlt(a6)
move.l d2,d1
jsr SPAdd(a6)
bra STOFFP_NoMinus
STOFFP_AfterPoint:
move.l d0,-(sp)
moveq.l #0,d0
STOFFP_loop1:
tst.b (a0)+
bne STOFFP_loop1
sub.l #1,a0
STOFFP_loop2:
moveq.l #0,d2
move.b -(a0),d2
cmpi.b #'.',d2
beq STOFFP_EndAfterPoint
sub.b #'0',d2
exg.l d0,d2
jsr SPFlt(a6)
move.l d2,d1
jsr SPAdd(a6)
move.l #Real10,d1
jsr SPDiv(a6)
bra STOFFP_loop2
STOFFP_EndAfterPoint:
move.l (sp)+,d1
jsr SPAdd(a6)
STOFFP_Finish:
cmpi.b #-1,d3
bne.s STOFFP_Finished
jsr SPNeg(a6)
STOFFP_Finished:
movem.l (sp)+,d1/d2/d3
rts
;**********************************************************************
;*** FFPTOS : transforms a fast floating point in a 10 chars string ***
;**********************************************************************
FFPTOS:
move.l d0,d5
moveq.b #0,d6
moveq.b #0,d1
jsr SPCmp(a6)
cmpi.b #1,d0
bne FFPTOS_NotNeg
move.b #'-',(a0)+
addq.b #1,d6
move.l d5,d0
jsr SPNeg(a6)
move.l d0,d5
FFPTOS_NotNeg:
move.l d5,d0
jsr SPFix(a6)
tst.l d0
beq FFPTOS_AfterPoint
move.l d0,d4
jsr SPFlt(a6)
move.l d0,d1
move.l d5,d0
jsr SPSub(a6)
move.l d0,d5
addi.b #'0',d4
move.b d4,(a0)+
addq.b #1,d6
FFPTOS_AfterPoint:
move.b #'.',(a0)+
addq.b #1,d6
FFPTOS_AfterPointLoop:
move.l d5,d0
move.l #Real10,d1
jsr SPMul(a6)
move.l d0,d5
jsr SPFix(a6)
move.l d0,d4
jsr SPFlt(a6)
move.l d5,d1
exg.l d0,d1
jsr SPSub(a6)
move.l d0,d5
addi.b #'0',d4
move.b d4,(a0)+
addq.b #1,d6
cmpi.b #9,d6
bne FFPTOS_AfterPointLoop
rts
;*********************************************************
;*** INFO : Put my name on *******************************
;*********************************************************
Info:
movem.l d0-a6,-(sp)
clr.l OKGadget
move.l IntuitionLib,a6
lea InfoWindowDefs,a0
jsr OpenWindow(a6)
move.l d0,InfoWindowHandler
move.l d0,a0
move.l 50(a0),a0
lea InfoText,a1
moveq.l #10,d0
move.l d0,d1
jsr PrintIText(a6)
move.l 4,a6
InfoNotOK:
move.l InfoWindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne InfoOK
move.l InfoWindowHandler,a0
move.l 86(A0),a0
moveq.l #0,d1
move.b 15(A0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(A6)
bra InfoNotOK
InfoOK:
move.l d0,a1
jsr ReplyMsg(a6)
move.l InfoWindowHandler,a0
move.l IntuitionLib,a6
jsr CloseWindow(a6)
movem.l (sp)+,d0-a6
rts
;****************************************************
;*** ZOOM : get On screen new coords ****************
;****************************************************
OnScreen:
move.l WindowHandler,a0
btst #HardMouseButton,HardMouse
bne OnScreen
bsr GetCoords
move.w d1,PolyTable+2
move.w d0,PolyTable
move.w d1,PolyTable+6
move.w d0,PolyTable+4
move.l GfxLib,a6
move.l RastPort,a1
moveq.l #2,d0
jsr SetDrMd(a6)
move.l RastPort,a1
moveq.l #1,d0
jsr SetAPen(a6)
DrawPoly:
bsr RectDraw
GetMouseCoords:
move.l WindowHandler,a0
bsr GetCoords
btst #HardMouseButton,HardMouse
bne UnDrawPoly
cmp.w PolyTable,d0
bne UnDrawPoly
cmp.w PolyTable+2,d1
beq GetMouseCoords
UnDrawPoly:
movem.w d0/d1,-(sp)
bsr RectDraw
movem.w (sp)+,d0/d1
btst #HardMouseButton,HardMouse
bne EndPolyWork
move.w d0,PolyTable+4
move.w d1,PolyTable+6
bra DrawPoly
EndPolyWork:
move.l RastPort,a1
moveq.l #0,d0
jsr SetDrMd(a6)
move.w PolyTable,d0
move.w PolyTable+4,d1
cmp.w d0,d1
bgt XNoProb
exg d0,d1
XNoProb:
bne XNoProb2
addq.w #1,d1
XNoProb2:
move.w d0,PolyTable
move.w d1,PolyTable+4
move.w PolyTable+2,d0
move.w PolyTable+6,d1
cmp.w d0,d1
bgt YNoProb
exg d0,d1
YNoProb:
bne YNoProb2
addq.w #1,d1
YNoProb2:
move.w d1,PolyTable+6
move.w d0,PolyTable+2
move.l FFPLib,a6
move.l RealMaxX,d0
move.l RealMinX,d1
jsr SPSub(a6)
move.l RealXSize,d1
jsr SPDiv(a6)
move.l d0,d5
;MinX
move.w PolyTable,d0
sub.w ScrMinX+2,d0
and.l #$ffff,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinX,d1
jsr SPAdd(a6)
move.l d0,ZoomMinX
;MaxX
move.w PolyTable+4,d0
sub.w ScrMinX+2,d0
and.l #$ffff,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinX,d1
jsr SPAdd(a6)
move.l d0,ZoomMaxX
;*
move.l RealMaxY,d0
move.l RealMinY,d1
jsr SPSub(a6)
move.l RealYSize,d1
jsr SPDiv(a6)
move.l d0,d5
;MinY
move.w PolyTable+2,d0
sub.w ScrMinY+2,d0
and.l #$ffff,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinY,d1
jsr SPAdd(a6)
move.l d0,ZoomMinY
;MaxY
move.w PolyTable+6,d0
sub.w ScrMinY+2,d0
and.l #$ffff,d0
jsr SPFlt(a6)
move.l d5,d1
jsr SPMul(a6)
move.l RealMinY,d1
jsr SPAdd(a6)
move.l d0,ZoomMaxY
;***
move.b #-1,ZoomFlag
rts
RectDraw:
move.l RastPort,a1
move.w PolyTable,d0
move.w PolyTable+2,d1
jsr Move(a6)
move.l RastPort,a1
move.w PolyTable+4,d0
move.w PolyTable+2,d1
jsr Draw(a6)
move.l RastPort,a1
move.w PolyTable+4,d0
move.w PolyTable+6,d1
jsr Draw(a6)
move.l RastPort,a1
move.w PolyTable,d0
move.w PolyTable+6,d1
jsr Draw(a6)
move.l RastPort,a1
move.w PolyTable,d0
move.w PolyTable+2,d1
jsr Draw(a6)
rts
GetCoords:
move.w 14(a0),d0
move.w 12(a0),d1
cmp.w ScrMinX+2,d0
blt XnoOK1
cmp.w ScrMaxX+2,d0
bgt XnoOK2
XOK:
cmp.w ScrMinY+2,d1
blt YnoOK1
cmp.w ScrMaxY+2,d1
bgt YnoOK2
YOK:
rts
XnoOK1:
move.w ScrMinX+2,d0
bra XOK
XnoOK2:
move.w ScrMaxX+2,d0
bra XOK
YnoOK1:
move.w ScrMinY+2,d1
bra YOK
YnoOK2:
move.w ScrMaxY+2,d1
bra YOK
;************************************************
;*** Window for a complete choice ***************
;************************************************
Manual:
move.l #StringGadget1,OKGadget
move.l IntuitionLib,a6
lea InfoWindowDefs,a0
jsr OpenWindow(a6)
move.l d0,InfoWindowHandler
move.l 4,a6
ManualNotOK:
move.l InfoWindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne ManualOK
move.l InfoWindowHandler,a0
move.l 86(A0),a0
moveq.l #0,d1
move.b 15(A0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(A6)
bra ManualNotOK
ManualOK:
move.l d0,a1
move.l 28(a1),a0
move.w $26(a0),d6
jsr ReplyMsg(a6)
cmpi.w #1,d6
bne ManualNotOK
move.l InfoWindowHandler,a0
move.l IntuitionLib,a6
jsr CloseWindow(a6)
clr.b ZoomFlag
lea MinX,a0
bsr Verify
lea MaxX,a0
bsr Verify
lea MinY,a0
bsr Verify
lea MaxY,a0
bsr Verify
bra WaitMenu
Verify:
moveq.l #0,d1
VerifyNext:
move.b (a0)+,d0
tst.b d0
beq EndVerify
cmpi.b #' ',d0
beq VerifyNext
cmpi.b #'-',d0
bne NotMinus
btst #1,d1
beq NotEvenOne
move.b #' ',-1(a0)
bra VerifyNext
NotEvenOne:
bset #1,d1
bra VerifyNext
NotMinus:
cmpi.b #'.',d0
bne NoPoint
btst #2,d1
beq NotEvenOneP
move.b #' ',-1(a0)
bra VerifyNext
NotEvenOneP:
bset #2,d1
bra VerifyNext
NoPoint:
cmpi.b #'0',d0
blt NoNumber
cmpi.b #'9',d0
bgt NoNumber
btst #3,d1
beq FirstNumber
btst #2,d1
bne VerifyNext
NoNumber:
move.b #' ',-1(a0)
bra VerifyNext
FirstNumber:
bset #3,d1
bra VerifyNext
EndVerify:
rts
;************************************************
;*** SaveILBM : A0 = screen *********************
;************************************************
SaveILBM:
move.l ArpLib,a6
cmp.l #0,a6
beq SaveWithoutArp
lea ArpRequest,a0
jsr FileRequest(A6)
tst.l d0
bne FileRequestOK
rts
FileRequestOK:
lea ArpRequest,a0
move.l 8(a0),a1
lea sILBM_Name,a2
LoopCheckDir:
tst.b (a1)
beq EndLoopCheckDir
move.b (a1)+,(a2)+
bra LoopCheckDir
EndLoopCheckDir:
move.l 8(a0),a1
tst.b (a1)
beq AlreadySlash
cmp.b #'/',-1(a2)
beq AlreadySlash
cmp.b #':',-1(a2)
beq AlreadySlash
move.b #'/',(a2)+
AlreadySlash:
move.l 4(a0),a1
LoopCheckName:
tst.b (a1)
beq EndLoopCheckName
move.b (a1)+,(a2)+
bra LoopCheckName
EndLoopCheckName:
clr.b (a2)
bra SaveIt
SaveWithoutArp:
move.l IntuitionLib,a6
move.l #SaveGadget2,SaveGadget1
lea SaveWindowDefs,a0
jsr OpenWindow(a6)
move.l d0,SaveWindowHandler
move.l 4,a6
SaveNotOK:
move.l SaveWindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne SaveOK
move.l SaveWindowHandler,a0
move.l 86(a0),a0
moveq.l #0,d1
move.b 15(A0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(A6)
bra SaveNotOK
SaveOK:
move.l d0,a1
move.l 28(a1),a0
move.w $26(a0),d6
cmpi.w #3,d6
jsr ReplyMsg(a6)
beq SaveNotOK
move.l SaveWindowHandler,a0
move.l IntuitionLib,a6
jsr CloseWindow(a6)
cmpi.w #2,d6
bne SaveIt
rts
SaveIt:
move.l ScreenHandler,a0
move.l a0,-(sp)
move.l 4,a6
move.l #$10000,d1
move.l #41000,d0
jsr AllocMem(a6)
move.l (sp)+,a0
tst.l d0
beq SaveError
move.l d0,sILBM_Buffer
move.l d0,a2
move.l #'FORM',(a2)
move.l #'ILBM',8(a2)
move.l #'BMHD',12(a2)
move.l #20,16(a2)
move.l #$0a0b,32(a2)
move.l #'CAMG',40(a2)
move.l #4,44(a2)
move.l #$4002,48(a2)
lea 84(a0),a1 ;a1<-Rastport
move.l 4(a1),a1 ;a1<-Bitmap
move.b 5(a1),d0
move.b d0,28(a2)
moveq.l #1,d1
lsl.l d0,d1
move.l d1,d0
mulu #3,d0
move.l d0,56(a2)
move.l #'CMAP',52(a2)
move.l #'BODY',60(a2,d0.w)
move.l a2,a3
add.l d0,a3
add.l #68,a3
move.w (a1),d1 ;d1<-BytesPerRow
lsl.w #3,d1
move.w d1,20(a2)
move.w d1,36(a2)
move.w 2(a1),22(a2)
move.w 2(a1),38(a2)
move.b #1,30(a2) ;ByteRun1
lea 44(a0),a0 ;a0<-Viewport
move.l 4(a0),a0 ;a0<-ColorMap
move.l 4(a0),a0 ;a0<-ColorTable
lea 60(a2),a4
divu #3,d0
subq.w #1,d0
sILBM_LoopColors:
move.w (a0)+,d1
move.w d1,d2
move.w d1,d3
lsr.w #4,d1
andi.w #$f0,d1
move.b d1,(a4)+
andi.w #$f0,d2
move.b d2,(a4)+
lsl.w #4,d3
move.b d3,(a4)+
dbra d0,sILBM_LoopColors
;a3<-Body StartAdress
;a1<-Bitmap
movem.l 8(a1),d1-d5
movem.l d1-d5,sILBM_PlanePtr
move.w 2(a1),d7 ;d7 <- # of rows
move.b 5(a1),d6
ext.w d6 ;d6 <- # of planes
move.w d6,sILBM_Depth
move.w (a1),d5 ;d5 <- Bytes per row
subq.w #1,d5
move.w d5,sILBM_BytesPerRow
move.l a3,a1 ;a1 <- Buffer
sILBM_LoopRows:
moveq.w #0,d6 ;d6 <- Plane to be computed
sILBM_LoopPlanes:
move.w d6,d5
lsl.w #2,d5
lea sILBM_PlanePtr,a0
lea 0(a0,d5.w),a5 ;a0 <- address of plane
move.l (a5),a0
move.w sILBM_BytesPerRow,d5
move.l a1,a2
add.l #1,a1
move.b (a0)+,d3
move.b d3,(a1)+
moveq.b #0,d4
cmp.b (a0),d3
bne sILBM_FirstAreDiff
cmp.b 1(a0),d3
bne sILBM_FirstAreDiff
moveq.b #0,d2 ;d2 <- flag identic/different
bra sILBM_LoopBytes
sILBM_FirstAreDiff:
moveq.b #-1,d2
sILBM_LoopBytes:
move.b (a0)+,d1
cmp.b d1,d3
bne sILBM_AreSame
tst.b d2
bne sILBM_AreSame1
subq.b #1,d4
bra sILBM_EndTest
sILBM_AreSame1:
cmp.b (a0),d1
bne sILBM_AreSame2
subq.b #1,d4
move.b d4,(a2)
moveq.b #-1,d4
move.l a1,a2
sub.l #1,a2
move.b d1,(a1)+
moveq.b #0,d2
bra sILBM_EndTest
sILBM_AreSame:
tst.b d2
bne sILBM_AreSame2
move.b d4,(a2)
moveq.b #0,d4
move.l a1,a2
add.l #1,a1
move.b d1,(a1)+
cmp.b (a0),d1
bne sILBM_WillBeDiff
cmp.b 1(a0),d1
bne sILBM_WillBeDiff
moveq.b #0,d2
bra sILBM_EndTest
sILBM_WillBeDiff:
moveq.b #-1,d2
bra sILBM_EndTest
sILBM_AreSame2:
move.b d1,(a1)+
addq.b #1,d4
sILBM_EndTest:
move.b d1,d3
subq.w #1,d5
bne sILBM_LoopBytes
move.b d4,(a2)
move.l a0,(a5)
addq.w #1,d6
cmp.w sILBM_Depth,d6
blt sILBM_LoopPlanes
dbra d7,sILBM_LoopRows
sub.l #1,a1
move.l a1,d4
sub.l a3,d4
addq.l #1,d4
andi.l #-2,d4
move.l d4,-4(a3)
move.l sILBM_Buffer,a3
move.l a1,d4
sub.l a3,d4
addq.l #1,d4
andi.l #-2,d4
move.l d4,d2
sub.l #8,d4
move.l d4,4(a3)
move.l DosLib,a6
move.l d2,d6
move.l a3,a5
move.l #1006,d2
move.l #sILBM_Name,d1
jsr Open(a6)
tst.l d0
beq SaveError2
move.l d0,sILBM_Lock
move.l d0,d1
move.l a5,d2
move.l d6,d3
jsr Write(a6)
move.l sILBM_Lock,d1
jsr Close(a6)
SaveFreeIt:
move.l 4,a6
move.l sILBM_Buffer,a1
move.l #41000,d0
jsr FreeMem(a6)
rts
SaveError2:
bsr SaveFreeIt
SaveError:
clr.l SaveGadget1
move.l IntuitionLib,a6
lea SaveWindowDefs,a0
jsr OpenWindow(a6)
move.l d0,SaveWindowHandler
move.l d0,a0
move.l 50(a0),a0
lea SaveErrorText,a1
moveq.l #10,d0
move.l d0,d1
jsr PrintIText(a6)
move.l 4,a6
SaveErrorNotOK:
move.l SaveWindowHandler,a0
move.l 86(a0),a0
jsr GetMsg(a6)
tst.l d0
bne SaveErrorOK
move.l SaveWindowHandler,a0
move.l 86(a0),a0
moveq.l #0,d1
move.b 15(a0),d1
moveq.l #1,d0
asl.l d1,d0
jsr Wait(a6)
bra SaveErrorNotOK
SaveErrorOK:
move.l d0,a1
jsr ReplyMsg(a6)
move.l SaveWindowHandler,a0
move.l IntuitionLib,a6
jsr CloseWindow(a6)
rts
;************************************************
;*** FastPlot Rastport,X,Y,Color (a0,d0,d1,d2) **
;************************************************
FastPlot:
movem.l d3/a1,-(sp)
add.w #10,d1
move.l 4(a0),a0
move.w (a0),d3
mulu d1,d3
move.w d0,d1
lsr.w #3,d1
add.w d1,d3 ;d3 <- Adress to plot
lsl.w #3,d1
sub.w d1,d0 ;d0 <- Bit to plot
neg.b d0
subq.b #1,d0
andi.b #7,d0
move.b 5(a0),d1 ;d1 <- # of bitplanes
subq.b #1,d1
ext.w d1
add.l #8,a0
FastPlot_LoopPlanes:
move.l (a0)+,a1
lsr.b #1,d2
bcs FastPlot_BitSet
bclr d0,0(a1,d3.w)
bra FastPlot_EndLoopPlanes
FastPlot_BitSet:
bset d0,0(a1,d3.w)
FastPlot_EndLoopPlanes:
dbra d1,FastPlot_LoopPlanes
movem.l (sp)+,d3/a1
rts
RemInfoFunc:
lea $1c(a0),a0
move.l a0,d0
CheckZero:
tst.b (a0)+
bne CheckZero
subq.l #1,d0
sub.l a0,d0
neg.l d0
subq.l #5,d0
bcs NotAnInfoFile
cmpi.b #'o',-(A0)
bne.s NotAnInfoFile
cmpi.b #'f',-(a0)
bne.s NotAnInfoFile
cmpi.b #'n',-(a0)
bne.s NotAnInfoFile
cmpi.b #'i',-(a0)
bne.s NotAnInfoFile
cmpi.b #'.',(a0)
bne.s NotAnInfoFile
moveq #-1,d0
move.l d0,4(a7)
rts
NotAnInfoFile:
moveq #0,d0
move.l d0,4(a7)
rts
;************************************************
;*** DATA ***************************************
;************************************************
SECTION rempli,DATA
IntuitionName:
dc.b 'intuition.library',0
even
GfxName:
dc.b 'graphics.library',0
even
FFPName:
dc.b 'mathffp.library',0
even
DosName:
dc.b 'dos.library',0
even
ArpName:
dc.b 'arp.library',0
even
IntuitionLib:
dc.l 0
GfxLib:
dc.l 0
FFPLib:
dc.l 0
DosLib:
dc.l 0
ArpLib:
dc.l 0
WB_Message:
dc.l 0
MyTask:
dc.l 0
OldFashion:
dc.l 0
ScreenDefs:
dc.w 0,0
dc.w 320,200,5
dc.b 0,1
dc.w 2,15
dc.l 0
dc.l TitreEcran
dc.l 0,0
even
TitreEcran:
dc.b 'Fractal Dynamics '
dc.l VERSION
dc.b 'by J-F Stenuit',0
even
WindowDefs:
dc.w 0,10
dc.w 320,190
dc.b 0,1
dc.l $100 ;IDCMP = Menu
dc.l $1000
dc.l 0 ;No gadget
dc.l 0
dc.l TitreFenetre1
ScreenHandler: dc.l 0
dc.l 0
dc.w 320,190,320,190
dc.w 15
even
WindowHandler:
dc.l 0
RastPort:
dc.l 0
TitreFenetre1:
dc.b 'Julia Set',0
even
TitreFenetre2:
dc.b 'Mandelbrot Set',0
even
InfoWindowDefs:
dc.w 20,58
dc.w 280,96
dc.b 3,4
dc.l $40 ;IDCMP=GadgetUp
dc.l $11000
dc.l OKGadget
dc.l 0
dc.l 0
ScreenHandler2: dc.l 0
dc.l 0
dc.w 280,96,280,96
dc.w 15
even
InfoWindowHandler:
dc.l 0
InfoText:
dc.b 3,0,4
dc.w 0,0
dc.l 0,InfoTextA
dc.l InfoText1
InfoText1:
dc.b 4,0,0
dc.w 10,20
dc.l 0,InfoText1A
dc.l InfoText2
InfoText2:
dc.b 5,0,0
dc.w 20,40
dc.l 0,InfoText2A
dc.l 0
InfoTextA:
dc.b 'Fractal Dynamics Generator PRO',0
even
InfoText1A:
dc.b '(c) Jean-François Stenuit',0
even
InfoText2A:
dc.b 'Many thanks to Igor Prozenko',0
even
OKGadget:
dc.l 0
dc.w 220,76,32,12
dc.w 0
dc.w 1,1
dc.l OKGadgetBorder,0
dc.l OKGadgetName
dc.l 0,0
dc.w 1
dc.l 0
OKGadgetName:
dc.b 1,0,1
dc.w 6,2
dc.l 0,OKGadgetText,0
OKGadgetText:
dc.b 'OK',0
even
OKGadgetBorder:
dc.w 0,0
dc.b 3,0,0,5
dc.l OKGadgetBorderCoord
dc.l 0
OKGadgetBorderCoord:
dc.w -2,-2,-2,14,34,14,34,-2,-2,-2
StringGadget1:
dc.l StringGadget2
dc.w 20,20,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget1Border,0
dc.l StrGadget1Name,0,StrGadget1SInfo
dc.w 2
dc.l 0
StrGadget1Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,StrGadget1Text,0
StrGadget1Text:
dc.b 'r Axis min',0
even
StrGadget1Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l StrGadget1BorderCoord
dc.l 0
StrGadget1BorderCoord:
dc.w -2,-2,-2,9,82,9,82,-2,-2,-2
StrGadget1SInfo:
dc.l MinX
dc.l Buffer
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
StringGadget2:
dc.l StringGadget3
dc.w 140,20,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget2Border,0
dc.l StrGadget2Name,0,StrGadget2SInfo
dc.w 3
dc.l 0
StrGadget2Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,StrGadget2Text,0
StrGadget2Text:
dc.b 'r Axis max',0
even
StrGadget2Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l StrGadget2BorderCoord
dc.l 0
StrGadget2BorderCoord:
dc.w -2,-2,-2,9,82,9,82,-2,-2,-2
StrGadget2SInfo:
dc.l MaxX
dc.l Buffer+14
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
StringGadget3:
dc.l StringGadget4
dc.w 20,60,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget3Border,0
dc.l StrGadget3Name,0,StrGadget3SInfo
dc.w 4
dc.l 0
StrGadget3Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,StrGadget3Text,0
StrGadget3Text:
dc.b 'i Axis min',0
even
StrGadget3Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l StrGadget3BorderCoord
dc.l 0
StrGadget3BorderCoord:
dc.w -2,-2,-2,9,82,9,82,-2,-2,-2
StrGadget3SInfo:
dc.l MinY
dc.l Buffer+28
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
StringGadget4:
dc.l 0
dc.w 140,60,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget4Border,0
dc.l StrGadget4Name,0,StrGadget4SInfo
dc.w 5
dc.l 0
StrGadget4Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,StrGadget4Text,0
StrGadget4Text:
dc.b 'i Axis max',0
even
StrGadget4Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l StrGadget4BorderCoord
dc.l 0
StrGadget4BorderCoord:
dc.w -2,-2,-2,9,82,9,82,-2,-2,-2
StrGadget4SInfo:
dc.l MaxY
dc.l Buffer+42
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
JuliaWindowDefs:
dc.w 60,30
dc.w 200,70
dc.b 3,4
dc.l $40 ;IDCMP=GadgetUp
dc.l $11000
dc.l JuliaGadget1
dc.l 0
dc.l 0
ScreenHandler3: dc.l 0
dc.l 0
dc.w 140,60,140,60
dc.w 15
even
JuliaWindowHandler:
dc.l 0
JuliaGadget1:
dc.l JuliaGadget2
dc.w 160,40,32,12
dc.w 0
dc.w 1,1
dc.l OKGadgetBorder,0
dc.l OKGadgetName
dc.l 0,0
dc.w 1
dc.l 0
JuliaGadget2:
dc.l JuliaGadget3
dc.w 104,20,88,12
dc.w 0
dc.w 1,1
dc.l JuliaGadget2Border,0
dc.l JuliaGadget2Name
dc.l 0,0
dc.w 2
dc.l 0
JuliaGadget2Name:
dc.b 1,0,1
dc.w 6,2
dc.l 0,JuliaGadget2Text,0
JuliaGadget2Text:
dc.b 'On screen',0
even
JuliaGadget2Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l JuliaGadget2BorderCoord
dc.l 0
JuliaGadget2BorderCoord:
dc.w -2,-2,-2,14,90,14,90,-2,-2,-2
JuliaGadget3:
dc.l JuliaGadget4
dc.w 5,20,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget3Border,0
dc.l JuliaGadget3Name,0,JuliaGadget3SInfo
dc.w 3
dc.l 0
JuliaGadget3Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,JuliaGadget3Text,0
JuliaGadget3Text:
dc.b 'r parameter',0
even
JuliaGadget3SInfo:
dc.l AA
dc.l Buffer
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
JuliaGadget4:
dc.l 0
dc.w 5,50,80,10
dc.w 0
dc.w 2,4
dc.l StrGadget4Border,0
dc.l JuliaGadget4Name,0,JuliaGadget4SInfo
dc.w 4
dc.l 0
JuliaGadget4Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,JuliaGadget4Text,0
JuliaGadget4Text:
dc.b 'i parameter',0
even
JuliaGadget4SInfo:
dc.l OO
dc.l Buffer+14
dc.w 0,10,0,0,0,0,0,0
dc.l 0,0,0
SaveWindowDefs:
dc.w 60,30
dc.w 200,70
dc.b 3,4
dc.l $40 ;IDCMP=GadgetUp
dc.l $11000
dc.l SaveGadget1
dc.l 0
dc.l 0
ScreenHandler4: dc.l 0
dc.l 0
dc.w 140,60,140,60
dc.w 15
even
SaveWindowHandler:
dc.l 0
SaveGadget1:
dc.l SaveGadget2
dc.w 160,40,32,12
dc.w 0
dc.w 1,1
dc.l OKGadgetBorder,0
dc.l OKGadgetName
dc.l 0,0
dc.w 1
dc.l 0
SaveGadget2:
dc.l SaveGadget3
dc.w 5,40,72,12
dc.w 0
dc.w 1,1
dc.l SaveGadget2Border,0
dc.l SaveGadget2Name
dc.l 0,0
dc.w 2
dc.l 0
SaveGadget2Name:
dc.b 1,0,1
dc.w 6,2
dc.l 0,SaveGadget2Text,0
SaveGadget2Text:
dc.b 'Cancel',0
even
SaveGadget2Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l SaveGadget2BorderCoord
dc.l SaveGadget2bBorder
SaveGadget2BorderCoord:
dc.w -2,-2,-2,14,74,14,74,-2,-2,-2
SaveGadget2bBorder:
dc.w 0,0
dc.b 3,0,0,5
dc.l SaveGadget2bBorderCoord
dc.l 0
SaveGadget2bBorderCoord:
dc.w 0,0,0,12,72,12,72,0,0,0
SaveGadget3:
dc.l 0
dc.w 5,20,187,10
dc.w 0
dc.w 2,4
dc.l SaveGadget3Border,0
dc.l SaveGadget3Name,0,SaveGadget3SInfo
dc.w 4
dc.l 0
SaveGadget3Name:
dc.b 1,0,1
dc.w 0,-15
dc.l 0,SaveGadget3Text,0
SaveGadget3Text:
dc.b 'Save name :',0
even
SaveGadget3SInfo:
dc.l sILBM_Name
dc.l Buffer
dc.w 0,29,0,0,0,0,0,0
dc.l 0,0,0
SaveGadget3Border:
dc.w 0,0
dc.b 3,0,0,5
dc.l SaveGadget3BorderCoord
dc.l 0
SaveGadget3BorderCoord:
dc.w -2,-2,-2,9,189,9,189,-2,-2,-2
SaveErrorText:
dc.b 1,0,4
dc.w 0,0
dc.l 0,SaveErrorA
dc.l 0
SaveErrorA:
dc.b 'Save Error, sorry',0
even
ArpRequest:
dc.l ArpRequestName
dc.l FileNameBuffer
dc.l DirNameBuffer
dc.l 0
dc.w 0
dc.l RemInfoFunc
dc.w 10,30
ArpRequestName:
dc.b 'Save file :',0
even
Menu00:
dc.l Menu10
dc.w 5,0
dc.w 60,10
dc.w 1
dc.l Menu00Name
dc.l Menu01
dc.w 0,0,0,0
Menu00Name:
dc.b 'Project',0
even
Menu10:
dc.l Menu20
dc.w 65,0
dc.w 60,10
dc.w 1
dc.l Menu10Name
dc.l Menu11
dc.w 0,0,0,0
Menu10Name:
dc.b 'Set',0
even
Menu20:
dc.l Menu30
dc.w 125,0
dc.w 60,10
dc.w 1
dc.l Menu20Name
dc.l Menu21
dc.w 0,0,0,0
Menu20Name:
dc.b 'Zoom',0
even
Menu30:
dc.l Menu40
dc.w 185,0
dc.w 60,10
dc.w 1
dc.l Menu30Name
dc.l Menu31
dc.w 0,0,0,0
Menu30Name:
dc.b 'Colors',0
even
Menu40:
dc.l 0
dc.w 245,0
dc.w 60,10
dc.w 1
dc.l Menu40Name
dc.l Menu41
dc.w 0,0,0,0
Menu40Name:
dc.b 'Picture',0
even
Menu01:
dc.l Menu02
dc.w 0,0
dc.w 90,10
dc.w $52
dc.l 0
dc.l Menu01Name
dc.l 0
dc.b 'S',0
dc.l 0
dc.w 0
Menu01Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu01Text,0
Menu01Text:
dc.b 'Save',0
even
Menu02:
dc.l Menu03
dc.w 0,12
dc.w 90,10
dc.w $52
dc.l 0
dc.l Menu02Name
dc.l 0
dc.b 'I'
even
dc.l 0
dc.w 0
Menu02Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu02Text,0
Menu02Text:
dc.b 'Info',0
even
Menu03:
dc.l Menu04
dc.w 0,24
dc.w 90,10
dc.w $56
dc.l 0
dc.l Menu03Name
dc.l 0
dc.b 'G'
even
dc.l 0
dc.w 0
Menu03Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu03Text,0
Menu03Text:
dc.b 'Generate',0
even
Menu04:
dc.l Menu05
dc.w 0,36
dc.w 90,10
dc.w $42
dc.l 0
dc.l Menu04Name
dc.l 0
dc.b 'S'
even
dc.l 0
dc.w 0
Menu04Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu04Text,0
Menu04Text:
dc.b 'Stop = ESC',0
even
Menu05:
dc.l 0
dc.w 0,60
dc.w 90,10
dc.w $56
dc.l 0
dc.l Menu05Name
dc.l 0
dc.b 'Q'
even
dc.l 0
dc.w 0
Menu05Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu05Text,0
Menu05Text:
dc.b 'Quit',0
even
Menu11:
dc.l Menu12
dc.w 0,0
dc.w 100,10
dc.w $53
dc.l 0
dc.l Menu11Name
dc.l 0
dc.b 'M'
even
dc.l 0
dc.w 0
Menu11Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu11Text,0
Menu11Text:
dc.b ' Mandelbrot'
even
Menu12:
dc.l 0
dc.w 0,12
dc.w 100,10
dc.w $153
dc.l 0
dc.l Menu12Name
dc.l 0
dc.b 'J'
even
dc.l 0
dc.w 0
Menu12Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu12Text,0
Menu12Text:
dc.b ' Julia',0
even
Menu21:
dc.l Menu22
dc.w 0,0
dc.w 80,10
dc.w $52
dc.l 0
dc.l Menu21Name
dc.l 0
dc.b 'O'
even
dc.l 0
dc.w 0
Menu21Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu21Text,0
Menu21Text:
dc.b 'On screen',0
even
Menu22:
dc.l 0
dc.w 0,12
dc.w 80,10
dc.w $52
dc.l 0
dc.l Menu22Name
dc.l 0
dc.b 'M'
even
dc.l 0
dc.w 0
Menu22Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu22Text,0
Menu22Text:
dc.b 'Manual',0
even
Menu41:
dc.l Menu42
dc.w 0,0
dc.w 60,10
dc.w $53
dc.l 0
dc.l Menu41Name
dc.l 0
dc.b 'L'
even
dc.l 0
dc.w 0
Menu41Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu41Text,0
Menu41Text:
dc.b ' Large',0
even
Menu42:
dc.l 0
dc.w 0,12
dc.w 60,10
dc.w $153
dc.l 0
dc.l Menu42Name
dc.l 0
dc.b 'S'
even
dc.l 0
dc.w 0
Menu42Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu42Text,0
Menu42Text:
dc.b ' Small',0
even
Menu31:
dc.l Menu32
dc.w 0,0
dc.w 96,10
dc.w $153
dc.l 0
dc.l Menu31Name
dc.l 0
dc.b 0
even
dc.l 0
dc.w 0
Menu31Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu31Text,0
Menu31Text:
dc.b ' Rainbow',0
even
Menu32:
dc.l Menu33
dc.w 0,12
dc.w 96,10
dc.w $53
dc.l 0
dc.l Menu32Name
dc.l 0
dc.b 0
even
dc.l 0
dc.w 0
Menu32Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu32Text,0
Menu32Text:
dc.b ' Green-Blue',0
even
Menu33:
dc.l 0
dc.w 0,24
dc.w 96,10
dc.w $53
dc.l 0
dc.l Menu33Name
dc.l 0
dc.b 0
even
dc.l 0
dc.w 0
Menu33Name:
dc.b 2,0,2
dc.w 0,0
dc.l 0,Menu33Text,0
Menu33Text:
dc.b ' Red-Blue',0
even
MinX:
dc.b '-2',0,' ',0
MaxX:
dc.b '2',0,' ',0
MinY:
dc.b '-2',0,' ',0
MaxY:
dc.b '2',0,' ',0
AA:
dc.b '0',0,' ',0
OO:
dc.b '1',0,' ',0
SoundOfTwo:
dc.b ' 2',0,' ',0
even
RealMinX:
dc.l Realm2
RealMaxX:
dc.l Real2
RealMinY:
dc.l Realm2
RealMaxY:
dc.l Real2
ZoomFlag:
dc.b 0
OSCenter:
dc.b 0
JuliaFlag:
dc.b 0
SmallFlag:
dc.b 0
ColorFlag:
dc.b 0
even
PolyTable:
dc.w 0,0,0,0
CoefTransX:
dc.l 0
CoefTransY:
dc.l 0
ScrMinX:
dc.l 120
ScrMinY:
dc.l 65
ScrMaxX:
dc.l 200
ScrMaxY:
dc.l 115
RealXSize:
dc.l Real80
RealYSize:
dc.l Real50
RealAA:
dc.l 0
RealOO:
dc.l $80000041
RealR:
dc.l 0
RealI:
dc.l 0
ZoomMinX:
dc.l 0
ZoomMinY:
dc.l 0
ZoomMaxX:
dc.l 0
ZoomMaxY:
dc.l 0
sILBM_Buffer:
dc.l 0
sILBM_PlanePtr:
dc.l 0,0,0,0,0
sILBM_Depth:
dc.w 0
sILBM_BytesPerRow:
dc.w 0
sILBM_Lock:
dc.l 0
Palette1:
dc.w $000,$f00,$f30,$f60,$f90,$fc0,$ff0,$cf0
dc.w $9f0,$6f0,$3f0,$0f0,$0f3,$0f6,$0f9,$0fc
dc.w $0ff,$0cf,$09f,$06f,$03f,$00f,$30f,$60f
dc.w $90f,$c0f,$f0f,$c0c,$909,$606,$303,$000
Palette2:
dc.w $000,$00f,$13f,$15f,$27f,$38f,$3af,$4cf
dc.w $5df,$5ef,$6ff,$5fe,$5fc,$4fb,$3f9,$2f7
dc.w $2f5,$1f2,$0f0,$0e0,$0d0,$0c0,$0b0,$0a0
dc.w $090,$080,$070,$060,$050,$040,$030,$020
Palette3:
dc.w $000,$00f,$31f,$51f,$72f,$83f,$a3f,$c4f
dc.w $d5f,$e5f,$f6f,$f5e,$f5c,$f4b,$f39,$f27
dc.w $f25,$f12,$f00,$e00,$d00,$c00,$b00,$a00
dc.w $900,$800,$700,$600,$500,$400,$300,$200
even
SECTION Vide,BSS
sILBM_Name:
ds.b 200
Buffer:
ds.b 60
FileNameBuffer:
ds.b 80
DirNameBuffer:
ds.b 120
END